package com.dj.mingkong.admin.biz.controller.system.vo.request;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

import java.io.Serializable;

/**
 * 数据字典VO
 *
 * @author zenglonghui
 * @date: 2022/7/12 17:11
 */
@Data
@Accessors(chain = true)
public class DictionaryAddVo implements Serializable {
    /**
     * 父级ID
     */
    @NotNull(message = "parentId can not be null")
    private Long parentId;

    /**
     * 数据字典KEY
     */
    @NotBlank(message = "dictKey can not be blank")
    @Size(min = 1, max = 118, message = "dictKey invalid")
    private String dictKey;

    /**
     * 数据字典值
     */
    @NotBlank(message = "dictValue can not be blank")
    @Size(min = 1, max = 1980, message = "dictValue invalid")
    private String dictValue;

    /**
     * 数据字典描述
     */
    @Size(max = 1990, message = "description invalid")
    private String description;

    /**
     * 链接
     */
    @Size(max = 230, message = "url invalid")
    @URL(message = "url invalid")
    private String url;

    /**
     * 排序
     */
    @Min(value = 0, message = "sort invalid")
    private Integer sort;

}
